Added the error message function. It still needs to be fleshed out, but the basics are complete. Also added fixes for the jshint issues.