- removed some debug code

 - added some logging to synchronization
 - fixed a bug in retrieving devices from the master server