Theoretical studies of optical non-linear effects in ultracold Rydberg gases