Some refactoring

Refactoring connected with UI and DataGridViews