MessageNum fully implemented

MessageNum logic fully implemented without bugs. HMAC still not
implemented.