Fixed errors

Added more error checking. Fixed problems with quotes.
Functions for entering data also created.