fix visibility and make classes final