Added some comments to start clarifying what does what.