Added possibility to turn terrain on/off and preliminary work for uncertainty.