Just a little bit of reorganization and graphics initialization