Undebugged version of offline queue handling, needs a lot more tests
Added more tests to synchronization