Removed nani dependencies and old django compat
Some PEP8 fixes for better readability