Add basic split algorithm (Issue #2)