Fixed several Java warnings