Refactored init of detail panel into multiple methods