Fix compilation errors.
Fix a bug in get_patch_around_cell and add a test.
Fix conflict.
Fix more conflicts.
Merge pull request #5 from Rombur/master

Fix compilation errors.