refactored content panel to nested class