Better interface for using as a module.