+ Refactor javascript