reorganized griditem.js