Nightly: update bottle.py to dev version (#514).

Includes work better with this version.
Nightly: refactor templates (#514).