Implementing handler merging.