Refactor and extend

Add controller so other directives can register events to be fired
on sortable actions.
Add test cases