Added some string functions and fixed some mistakes