Vastly improved parser for NwInput.