Some bug fixes and some slightly questinable changes.

ADT4J works fine with these changes.