Moved common stuff into Geometry class, converted Square pointers to IDs to save space