Update return types and loosen restrictions on class types for overriding

Change-Id: I6b9ec296aba7453d2b3c6f24d4be8934145b1e0c