Move common stuff into init.sh