Added some javadocs to the upgrade methods etc.