cleaned some code...
fixed java method return support