fix many problems in get_nice_poly and related functions

add Write and String functions to lattice

add support for complex numbers to round function