added rewire
using now the db object to make queries in controllers instead of returning static content. DB provider can be easily modified using rewire