Moved parsing to a generator. Moved parsing tests to their own file.