refactor src/main.c based on cpplint.py