Remove debug, unused code, merge table changes with sqlite