Activity changes

This will move the code for activity changes out to macros and add some new event types.