changed name of modules to patches (modules)
modified to use lookup-samples abstraction; various cleanup