Separated graphics and input init for better control.