Fixed all javadoc warnings.
Removed unnecessary casts and "else"s.