Structure the main function
Merge pull request #54 from neithernut/add-main-function_structure

Structure the main function