more refactoring, moving things into databind