Added offline mode, fixed some stuff.