many cleanups and improvements, add support for checking of offline signed package certificates