some code cleanups
added settings menu