Adding a Factory

In addition to introduce alternative syntax to check the same thing in
the controller, I have introduced a Factory in order to provide the
http service, which should be used by the app.