Added URI template support. Cleaned some code. Made conversions extendible.