Refactored constants definition
Added an initial set of unit-tests
Fixed md5sum issue

- Replaced calls to md5sum with a macro
- Fixed invalid calls to md5 instead of sha256
Bugfix for file_control

Some entries of file_control were erased too quickly. This
commit fixes this bug.