Fixes after migrating to Java classes.