Refactored some JS. 20min