Refactored tag concatenation to keep it clean