add profiling support, refactor switch statements
remove pktCount (uninteresing) + cleanups