Added version of bmaToLinks that compiles, need to perform some fixes in respect to end id's used in link hashes (*.3/*.5)