Cleaning up, adding documentation, getting rid of some bad programming practices.