Refactored to 'correct' angular provider structure
Refactored to angular utility functions