Improved debugging
Added filtering and rotation of tag