Removed all .indexOf, replace with underscores version (for IE8)