Re-ordered the dev mode code.