[KFSQA-608] Fixed some small style issues. Also corrected a small logic problem (using =~ to search for a substring returns either nil or the position of the substring, so we should use .nil? instead of comparing to 0.). Otherwise, everything seems to be working. Go ahead and commit to master.