ConfigManager added. Refactoring to object-oriented