some changes and starting work on SQLite support