const correctness improofments and base32 fixes