if each_instance is already slow lets use the new() instead of problematic instantiate()

I have also added bundler as dependency resolver and rewritten a bit the db handling in tests.