Fixed errors in error messages and input parsing. Also added String methods to make output easier.