refactor prim defs to be cleaner
more consistent naming
work with python3
subclass Prim for each methods dict, to cons less