The above code does four main things: