Rearranged menu, fixed a few bugs.