Fixed a bug in the C code. Added a test folder in data