Modified to serve as a module.