In progress: pseudo-code mostly converted