Moved databse funcs into db.go
basic form framework