YUCK! Is there any way we could keep this kind of ugliness out of API classes?