Register all polling functions

Allows us to cancel polling functions when the page exits
I just moved the following block of code around so that all filters, factories, and directives are grouped together.