implement test (and bug fixes) for merging pulses; rearrange test dir structure