Refactored Configuration Class

Now with slightly less memory hogging.
Also configurations now actually write to file.
Fixed DataSources according to Datasource API changes.