Refactor entropy computation
Format tweaks