New API, improved Action monad, refactored out Internal module.