gray-crawler: refactored MBR code into generic PT code