Adding functional version using top-level module and imports.