Minor fixes

Minor fixes on tag structure and a bit of cleanup