Refactor the decoder to better levare the codec utils
Consolidate api and rpc projects