Bugfixes, tweaks and refactoring

Firstly, excellent job!!

Following turnkeylinux/tracker/issues/91 I've forked tendenci-tkl into turnkeylinux-apps/tendenci, and performed some bugfixing, tweaks and refactoring. These changes will be included in TurnKey Tendenci 13.0 once released.

To ease collaboration, it would be great if you could merge these changes into the official repo, so pulling updates will be a lot easier...