Some general tweaking + template work.