Add exists() and split out by()
Clean up tests