added SETTINGS menu, more code cleaning