refactored Configuration class, and added comments