Refactorings and rebuild with jdk6