added tests to verify migration down to and including a given version, cleaned up a few things