Clean up code in view composers.