Added #regions to the code.

To make it more readable.