Added menu factory, menu/gui refactoring.