added support for comments, basic error handling