Tidied up the tag handling
Added in categories