removed unused C variables, organized python code a bit ...