The constant LOG_G in globalDefinitions.hpp is incorrectly definied as 40. It should be 30.
LOG_G is not being used anywhere, so rather than fixing it we should remove it.
LOG_K is also not used and LOG_M is only used in one single place. I suggest that we remove LOG_K and move LOG_M to where it is being used.