Add license, and rewrite Mod R/M decoding function.