Move 2 tab controller/directive/factory bits to individual files. Add test cases.