refactor comments for function structures
Changed interface for capture et al