Structured code hierarchy and added a menu (which doesn't do anything yet)