Improved chunx by encapsulating types