Code restructuring: get_monomials moved to nc_utils