Better input parsing.