Massive changes to the panel handling
Fix merge conflicts