Periodic boundary condition added

-Periodic boundary condition added
-The code is more organized