Add more robust TextDynamics
Fixed lint errors.