This should make the code cleaner, more robust and errors should be clearer. we also changed the configuration format a bit.