fixed arrays that weren't getting reset in read. cleaned up some code and increased version number