Refactor KineticTextInput and KineticCursor