Enhance tags

The main change of this is the ability to have multiple tags for a particular shape (see commit comments).