various improvements to input