cleanup of datatypes and dead code remove.