Some improvements to method handling and return types