incorporate stuff from the modules branch.