Fix imports generated by genprimopcode
Comment out unused code
Remove redundant code