Minor code cleanups and ported some p4 interfacing code over to the p4 python mode.