this makes the API more sane, although the internals will need to be rewritten at some point in the future.