Removed blank option in type
Implemented more complicated replacements including regular expression support and more caching