Optimize mouse control

1. Optimize mouse control
2. Detect error
3. Caching op perform result
4. Minor bug fix