Separate json

Take a look guys. I think it is way neater. Also learned a lot about URI builders, parsing JSON etc. 
The `isOnline()` function should be used whenever we connect to the Internet.