Move configuration & setup out of main.
Refactor configuration.