Some code updates so app can run using jdk6