Add more comments and rename some variables in OverlayManager

This should make it a bit easier to follow the code.

Change-Id: Icfb0686ebfaa994bace1008c2d9496b49c3b9bbc