overhauled template to be a package rather than class