Code changes according to java code conventions