Added commenting and testing for detail panel