working on cleaning up type switching in sqlite backend and preparing for templated type support