File cleanup, reduce name collisions, PEP8, fix a regex