autoload, add extra trims, move functions around