Reorganize code, make things easier for conversion; fix zenperfsnmp