Put new attachments at the top of list after uploaded
Don't return attachments for post #0
Remove unused template function