Cleaned up the integer and value check at the beginning of the program