Removed dead code
Updated java file