refactoring, JSDoc, readability