remove unused imports
remove redundant px unit
fix minor pep8 / rst whitespace issues
avoid name collisions by retrying and incrementing name length if needed