Rename CLEANUP macro to a more meaningful name
Fix minor style issues
Fix regression issue

Bug fixed in 82a4212918bed6f6610122992769cc1d5ed7101f was reintroduced during merge.
Add offset to resources and switch to length.
Remove "data" from resources.
Merge pull request #224 from wxsBSD/entropy2

Add offset to resources and switch to length.