Finished rewriting datatype section