Add flat option, closes #6.