broke Panel constructor code into helper methods