Added the prepend() and append() functions along with the tests.