More replacement functions going along with their tests.