Index long and short with unique constraints
Fix URL factory usage