Fixing bugs on the MA strategy and adding a few tests