Separate out database functions from the rest of the theme into a mod