Reformatted entropy.js