Added messiness to c code (NEED TO TEST)
Added messiness to c code, need to test, also launched some early simulations on messy data.