Add simple templating system

Depends on GNU Make.
Convert files to use templating system.