Tweaks and adding detect-mode