Refine Device connection, disconnection and init