Added comments/javadoc, removed not used import and nicer code