Simplify complex method - https://github.com/fisharebest/webtrees/commit/4d83562e014f560f52e5779677856ad3a7e54e2f