Parse, don't validate

Take raw input, parse it into a safe shape, and keep the invalid states out of the rest of the program.