Fixed the goal base finder's segfaults and switched it to using arma operations