Fix factories and broken tests. Still working on view test.
Remove out-of-place files.