Code refactored to match JSLint.
Added the solution to the 'Sum of intervals' kata.