Const correctness on functions calls. Changed all structs to be passed
by const & as opposed to value or const *. Changed _p_base_model NULL
checks to be assert, this caused the need to update several tests.