Implemented periodic boundary conditions, and fixed arrays.