Move optimisation independent component into a common directory