Tests

Finally bringing in @Abizern's work on tests. Have taken out the automatic migration feature while I continue to think whether it's worth it.