added ScalaDoc and removed noisy debug message