Cleanup: file naming is more coherent, requires don't use __dirname, and moved a couple of files.