Extract common string to constant
contains() instead of indexOf()
Merge pull request #121 from nurkiewicz/cosmetics2

Extract duplicated string, use contains() instead of indexOf()