Alleviating some memory leaks, and adding test script to use with valgrind.
Adding initialize from string ability to constructor (Thanks to bzwheeler)