Add togglePackages with tests