use panel:CreatePanel
refactoring
more refactoring