Better code for configuring settings and c3po compatibility fix