Periodic boundary conditions now work.

Address #49