Refactoring and documentation of Application