Moved panel creation to panel class.