Refactored the tag filtering and throwing of missing tag exceptions.