Add StringUtil lib, fix some bugs into controllers