big optimizations, and added a weeding-out pass before the crypto which helps a tiny bit too