Adding comments, tags and error checking