#25 (3), JS Refactoring