add some basic tests for Add/Has
fix delete
move branch into separate file