Significant revision to the codes for the main functionalities of fitBMA()

I realized I have to change more of the subsequent codes to make the
function work with the new matrix dimensions Jacob wanted. This revised
version is shorter than what we had before, for I didn’t need some of
the user-defined functions we had.