Code clean up. Eliminate compiler warnings and migrate to java 1.5