Refs #13 Added windowlength optional argument