Added logging and (rough) state tracking

now logs and updates the menu bar at the top of the screen correctly.