comments and restructure
added menu state