Moved more stuff to provider, added conditional string replacement