Check recipes with regular expression rather than strpos. Fixes #63. Code cleanup for clarity (mode detection)