Separate out configuration and complex functions