Classes and autoloading

I spent a lot of the day cherry picking after having to revert back about 30 commits

I have included the Config class in this change and also and changed the way autoloading works

Now each set of inclused has its own init script which we include from the main init script ;)