Cleaned up main.c... I think :)