cleaning up, added template tags.