(mostly) re-implemented offline devMode toggle