Begins adding activity rules and evaluation
Merge pull request #627 from kitan1982/activity-refactoring

Activity refactoring