move a little code out of init.el in to init.d/main.el