Put database stuff in separate file