Tested migration, fixed bugs.

Once this is applied to the server, #63 can be closed