Duplicated code should be put into a proc. See the README.md if you want to know more.