Fix linking for BMA code

Some classes used to be templated and therefore contained the implementations in the header. This of course does not work when linking, because the definitions should be in source files.

Edited by Jadebeck, Johann Fredrik