Moved menu control logic to service / directive