Cellular Internet Of Things: Optimisation Of Random Access And Relaying Communications