Refactoring, not done yet
Grid not working