startring to clean up sql, other minor places.