Refactored Java classes