Adding comments and finishing integrateNiagara function.