Wasn't quite dealing with the dates properly, this has now been resolved

Also fixed the defaulting of parameters