Update README
Add tests for the examples given in the README
Add replace function