Refactored the coordinate system to use a new class, MatrixElement

- Added Class MatrixElement (represents an element in our matrix)
- Refactored SparseMatrix to use MatrixElement (1 array instead of 3)