initial refactoring
fixed NPE
Merge branch 'feature/ui_performance' into develop