Templating and delete unnecessary functionality