Added comments to pre-existing code