There's a lot of code-duplication on the public and internal API's. This can probably be reduced by quite a lot.