Make some internal classes final