Added some Java files and did a little cleanup of the existing C++
files.