Inlining, Optimization, Bug fix in Periodic Boundary