Started fleshing out conversion code