Remove unnecessary java code