Factored out DB params
Added function wrapper for fetch_all
Initial gen implementation