Organize the code formerly in cotswold.js into separate files.