Added a menu, change mode by clicking
manual merge with alex B
resolved merge problems, compiles