Finish refactor for the moment, will fix functionality later
Fix error in sqlite create table statement