Added a menu function

This function allows selecting modes by specifying flags. All flags can
bee seen in help function added in commit
bcdbbd6fa6a495dc306da0b98041623af173c171.