don't wrap Jars that already are bundles

Also did some refactoring.