Removed unused code
Deprecated use of print in favour of log, other trivial changes
Fixed the check for existing tag and overwrite for addTaggedQueryForCollection
Removed addTaggedQuery (where a collection is not specified), at least until the use case for it is clarified