Bug fix: bad indexOf check
Fixed broken unit test
Fix lint errors