Refactor to follow Java conventions