Added bsae/magic and associated tests.