Split the javascript monster exercise in two.