Changed java version to 1.6.
Made some minor code changes needed.