organized code, added comments, and turned off php error reporting