Added logging and reorganizing application configuration