Make packet class more pythonic
Improve debugging and fix raw energy consumer termination