modify
modify
modify
move directive code to controller
modify
prepare for karma
modify
Merge branch 'refactor'