Move common stuff into common place