Don't run when entering a buffer; there's no need.
Set foldmethod to marker.
Only clear signs for current file.
Add comment.
Move function so code reads better.
Clarify code.
Add comment.
Don't read the filename unnecessarily.