Cleaning up Scanner and adding cases for tag types