Added more security

Makes sure all inputs are in the proper format. It does not print a
message, however, so if the user doesn't know