Refactored code style to Java standards