Refactored Code to Cover More Tag Types