Optionally pass after and before as arguments. Fixes #8.