Split functionality up into pre/post compile functions for better performance.