making the sql branch depends on sqlalchemy only, improve tests coverage and add some bugfixig