Move constant clean up functions to its own mixin.