Add text input traits methods. Remove unneeded code.