Cleanup to main.c