Refactor and update b64.c