cleaned up configuration code