Updated version, fixed writing to file, made a bunch of bugs(not
noticable now), renamed & created some variables, and made code more
readable.