Added coverage to karma
Don't pick up coverage files on production
Added new tests to cover more of the time elements scripts

- Fixed bugs found while creating tests