Some refactoring. Add reference configuration
Refactoring