Reformatted the code

Reformatted the code so that the code within the internal blocks in the
functions are aligned properly.