Fixed various docblocks
Remove double if
Merge.