improve code structure; add "no menu" option