Added error catching to menu functions. Allowed use of 'ans'