Added Factory and CORS rest filter.
Split up the script.js
Added Service