Made a change to the vertiex conversion function so that it's a little bit more clear,a nd I fixed a typo. You should use the write_code function
Fixed another typo, it should be nice and easy now