Fixing edge case in ceil_log2, and a minor style improvement.