some cleanup and splitcode and add new option %H print hex array