Add periodic, neighborhood options; fix #22, fix #23, fix #24