DONE added read/write comments and cleanup