Add documentation and remove apply.

Also move 'Result' into its own module.