Implemented Menu and Back button functions.