Configuration completed. Refactoring and commenting of code.