Lots of optimizations, to make Aries perform better