Minor adjustments, cleaned up comments, added EOF, etc.