Miscellaneous fixes
Merge branch 'master' into tests
Convert remaining instructions to cgtypes