Corrected errors, added demo bit for Java interop