Added p and q separately, removed unnecessary subs and eval_nseries