Fix for JDK7
Some cleanup
use Array.ofDim
Merge pull request #1 from HairyFotr/master

Some cleanup + JDK7 Fixes