Removed unnecessary code, and changed file reader and writer classes to
utf-8 encoding