Refactoring and add comments (Logiscope)