BMCApplication -> BMApplication. Sorry!
Changed to check type of the result from refreshTokens.
Changed to check class of the object before assigning it to _object.