Frontend templating

Lots of edits here.
going to delete this f, not used