Detail panel cleanup. resetDetailPanel() also added.
Merge conflict.