Stated re-working main function and utility classes.