Improved the API. No more cast() necessary. Still typesafe.