main reorganized: init, quit, loadImages