Add constant.h and first refactor main.c