Added basic template functionality.