Refactor reduce into decodeint

Add a small comment noting generation of public key