Optimize imports
Minor improvements:

- Java 7 diamonds
- append char instead of String
- do not calculate the idValue in a loop