Program can now be run as standalone or module.