Cleaned up java