Finish an initial bug fixing

An initial bug fixing has been finished. Now the program runs to end,
but the light source rotation contains problem still.