Code reorganization. Add a main.c