clean up Poly code