Added error messages and validation. Will work on classes and objects next