Develop

I'd like some general input if what I'm currently doing with CREG makes sense, so here's some code.

Reason I'm doing a pull request while it's still unfinished is because in a couple of days I'm going skiing and will be offline for a week, so wouldn't want to have too many merge conflicts.