C99 templates namespaces. Enum support.

Should have been two commits. Oh well.