factored out save func for db objects, added conf