The null pointers and out of bounds are fixed. Will do more testing.
Added Ant buildfile.