Make database API purdier