Adding optimisation and injecting population