Api cleanups

This looks much better. Sadly we still can't use bitflags...