Made use of --id_length and --extra_pid_chars arguments. Some PEP8 formatting.