Removed trailing whitespace. Rewrote some of my python template.