Remove "use strict", resolve `result` bug, error length check, and consistent naming