BmpPanel refactoring