Fixes database and rspec issues