Made sure classes are final and implements the right interfaces.