Refactor gl_user main program.