Added some rudimentary documentation, and converted some of the class fields to properties.