Exactly. Small reusable functions are perfect for services/factories like this, it's automatically name spaced within the angular app, and it is only exposed where we specifically inject it.