Only allow the currently allowed formats.
Refactor the reader. Move statements to the top-level where applicable.