fixed Java warnings, added type information