Merge common functionality into a single function and then call that function from across the entire code base.