Added a Grid class and JavaDocs