:ghost: A bunch of IRGen, and optimisations