Fixed some missing imports, removed unused fields and solved
reader/writer error.