Extracted logic to new LwM2mClient class