moved functionality to hook
moved logic to hook
moved functions to utilities file
Merge pull request #29 from ajstanley/7.x

7.x