Added nested menu ability and various other code clean up