Upgrade to release version, add a few comments and clean up some code.