Refactoring configure AutoPanel. Fix invalid tests.