add helper functions prototypes to common.h
move helper functions implementation to common.c
move helper functions tests to common.t.c
this changes will allow reusing the helpers more easily