Split functionality across functions.