installed jslint, toned the date intervall, refactored code