remove unnecessary stuff from template