Fixed travis errors for scratchpad.
Separated service and directive from scratchpad module file.
Fixed travis errors.