Updated algorithm; switched from periodic to reflective boundaries.
More algorithm modifications.
updated algorithm
merged with upstream
Merge pull request #5 from Kadish/master

algorithm modifications