Fixed type safety warnings. Introduces non-entity return-type