Refactoring, all tests passing, data imported