Refactoring location and team to re-use code.
Fixing team template.
Pep8 fixes.