refatoring application
added configuration file, use config checks
refactoring