Fixed refactored js