Core: Drop strundefined variable

Closes gh-276
Core: Optimize `indexOf` usage

Use a simple `for`-loop as it is faster than native function.

Closes gh-280