new sync/registerDevice logic implemented,
documentation finalized,
changed some classes and methods to be internal