Move configuration and utility functions in.