Worked out services stuff to match angularJS docs and got factory function working under that setup.