Inicial cleanup and refactoring:

  * changed tabs to spaces (PEP-8)
  * renamed variables that shadows Python builtins like `id`
  * renamed some variables to undercase_name instead of camelCase (PEP-8)

Lots of refactoring work to do, trying to split in smaller commits.