A bit of input parsing.