Some cleaning and added docblocks.

Some cleaning and added docblocks.