Fixed doc comments.
Style fixes.
Fixed unused code problems.