Reworked the code / added more feedback

Added extra if statements to provide more detailed feedback, and re
worked the code to make more versatile.