Fixed some bugs, and added more detailed error messages to the class file buffer.