some cleanup and type fix in monomial basis