Sqlite support and more improvements