Split up new module for entropy function to convert later into C