Added analytics for perspectives. Code has been cleaned