Change the name of runAnim function to runMainLoop