Adds unit tests to #2 and the code to pass them

It is now clear that this code needs cleaning up.

Newbie approach to dev on angular. It is necessary to have a separation
between support code and actual code that should be in the controller.

See this post about the typical errors angular newbies do:
https://www.airpair.com/angularjs/posts/top-10-mistakes-angularjs-developers-make

And this interesting post on Stackoverflow:
http://stackoverflow.com/questions/24604103/angular-js-best-practice-for-defining-a-utility-library
Updates #2 with a service to separate the task string

This separates some logic from the controller.