/sql fixes, autocompletion for classes, small other fixes