Working converter

This will actually conver the code properly. The last issue is comment formatting seems off for some of the comments.