Some improvements to InputParser