I fix the ending.
Anderson and Shepard arrive at the control panel for the Citadel. Before Shep or Anderson can open the arms, TIM shows up and starts controlling Shepard's body, preventing either of them from activating it. TIM says that there is a way to control the Reapers and that he isn't lying. Then depending on how Paragon or Renegade Shep is, s/he can break free from TIM's control. Shepard or Anderson kills TIM, and then Shepard goes to activate the Citadel arms. Instead of opening it, a "Reaper VI" appears, similar to that of Vigil or the one on Virmire.
He is the last known record of his species. His species created the Mass Relays, and their greatest achievement was the Citadel, a relay into dark space and beyond the galaxy. His species also created the Reapers. Their true origin was lost when the Reapers started harvesting his species. At this time there are few Reapers, but they are patient and exterminate them, thus starting the cycle. The Reapers retreat into dark space, except Sovereign who is to start the next cycle. Each species following has evolved and expanded using the creations of the first species. Each harvest meant more Reapers, and faster harvests, until the Prothean empire. This harvest took centuries, and as a result the Reapers changed the genetic code of the Protheans into the Collectors to be servants and collect species while the Reapers waited for the command from the Citadel to invade.
At this point in time the "Reaper VI" reveals that it is truly an AI with control of the Reapers. It directed Sovereign to start this cycle. (My reasoning for it not starting the cycle being that the first species wisely separated the Citadel control from Reaper control) When Sovereign failed, it directed the Reaper known as Harbinger. Harbinger is the first Reaper, the one designed from the first species(as well as Sovereign), and so the AI finds it easiest to control these one. Lastly, the AI warns against the Crucible. It was designed from previous records including his own species. It may not be complete and some may have been lost over time.
This is where the ending fully comes in. The AI asks Shepard what he wants to do. If the Crucible score is over a certain amount, Shepard can fire it deactivating all Reapers including the ones still in dark space. If the Crucible score isn't high enough, it still destroys all Reapers, but the Mass Relays(including the Citadel) are deactivated or destroyed. If the Crucible score is really low, then it wipes out all life(Halo effect for the lulz). Shepard can also use the AI to control the Reapers.
Have at it people. Hire me Bioware.