python: missing dealloc
some cosmetic and minor fixes
updated coding style