Refactoring: foreach instead for, JavaDocs and so on.