Java module refactor