Refactor to use pin and comment templates