v. 0.0.4: partial JSDoc + small refactoring