Added input checks.

Known bugs:
-checkInput function cannot handle inputs other than integers and will end the
program prematurely.