Added APIs, fixed function bugs

From now on, y_stringhash is required to run TFA_SAMP.