moves some functions to an external lib from init.el