Fix Java Codes and re-layout