Added some comments to addFrame