More attempts at optimisation