refactoring properties panel and events