Updated sources to target older Java runtimes (1.4)

- Modified for each style loop in favor of simple for iteration
- Modified pom.xml to compile sources to Java 1.4 while keeping test code on 1.5