Better sqlite stuff for list, unit tests for list