Reduce duplicated horizon code

Change-Id: I106858cee2f9dcb87b59022790f48c263db7b7e0
Implements: blueprint reduce-horizon-code