Some improvements + added Example comments.
The addMissingMonths function is wrong though. Need to fix this.