Refactor the main file
Refactor and normalize style guide