Work on last template + code cleanups.