move things to templates, add option to use packages (wip)