Refactor behaviors to use partially applied functions