Working mostly on client
moved db layer to it's own package