Removed external dependencies (str_replace).