style cleanup
test for panel state