Fixed issue #3
Made maxCycles optional so that the user can pass in nothing and get an unlimited number of cycles