Menu quiting works. Also fixed performance issues