Code clean up
Code clean up 2
Added asserts

Add -ea to the VM arguments to run the code with asserts
Fixed all bugs found by FindBugs updated comments