Program.cs refactoring