Added offline support

Not checked if works, internet at school down.