Added state initialisation.