I didn't review the java stuff separately, so just port my scala comments here :)