Added online updates function

Also re-arranged certain things.