Updated to use better string funcs