Revert "separate initialization logic from main method"

This reverts commit 7dcb3bf9b3e2672cc1de1897cd293af42d2bcac1.