Mod re-write & example

The scripts have been broken down for when working in different
environments, index and pages are there as an example, for rapid
deployment.