setup: Refactored common functions to setup-common