Some updates to main.c