some clean ups in ecapnpc.erl