Feature/validate config

Wasn't sure about this, so I put it in. I'll remove in next commit.