Javascript Refactors.