Some refactoring (Configuration). Not finished yet.