refactored single event view logic. moved it out to separate file.