Added add_fragment helper function, added tests for utils