Delete currentSelectStart and currentSelectEnd because it is never used.
Fix bugs.