added grid control for data
refactored diagram items