Refactor pack5 function
Refactor unpack5 function
Move pack5 & unpack5 to separate module