Updated event profile tab logic with comments

Added comments to the code