Fixed java errors, some at least