Split controller for menu into separate function for easier testing
Added first test for controller
Added test to verify that panes are added properly