Consolidating common code