Refactored and fixed configs