code formatting and if not application.mode is defined, use the dev mode