Refactor classes in sql subpackage to parent package