Moved the Rope into a separate file, flattened structure
Added more tests
This fixes #275