Refactored dependency injection to not include the $ naming convention. Updated example to use dependency injection.