Move extra conf logic to client.
Lots of cleaning and fixing