Implement programmatic configuration in the ApplicationFactory.
Change the Environment constant names to be clearer.
Reorganizing debug log.