Indentation refactoring, attempt to understand the code for future usage