Fixed up the menues and handle errors