Working if statements and messages. Fixed errors