tweaked and extended tfm

Rewrote page logic to support using a template library -- smarty.
added pheal to query the api (character name validation).