Refactor #1 Applied (Extract methods from long method WinMain)