[Projeto 2] Documented and Refactored main.c