Fixing  ScalaDoc and code formatting