Refactor: Changed api to be a directive generator service

This refactor was largely due to @robwormald.  This commit cleans up
most of the menial aspects such as test refactoring and the demo &
readme.