Cleaned up file flags & tag helpers, moved everything into templates