Fixed scheduler javadoc, and one single unnecessary cast in takeWhile