Adding Configuration class
Refactoring and improving comments