short urls and code cleanup