url adjustments and replaced mysql gem with mysql2 gem