Progress on turning pseudo-code into c code