cleanup unnecessary template and code