cleanup java code