clean out template fill in with metadata