[code style] Use for-each loop where possible
[code style] remove redundant throws clauses
[code style] private and final are redundant for methods
Fixed the copyright notice