Added even more loops!
Clarified the names of some arguments and removed bad NULL check at the start of s_init()
Initialized str and s_str with NULL.