code style improvements, easier-to-read method names. finished with sql, I think