Minor commits for v1, beginnings.
* Refactor some of the db registry stuff
* Minor refactor on helpers (don't call length twice)
* Minor refactor on log entry - separate sql queries into mixins
* Create initial issue domain object
* Add sql modules dir