added menu system and support for multiple levels