Refactored post-upgrade method

Also cleaned up docblocks a bit