Factor this cruft away