#1 Added code to validate input and implemented back, up and down
buttons.