Added a lot of comment. Should be done. All that remains is presenting the task.