Code cleanup
Added a couple comments
Actually enable/disable panels as configured