Added high level commentes breaking down the bits of code required