Added support for adding custom query tags when adding 'custom_uri's.

Also added registering of the rewrite ID tag, which wasn't previously done.