Added support for replacement tags.