clean up code
added test cases for basic string functions