Megasonic-assisted development of nanostructures