Reorganizing.
- js files have declarative names
- moved factories into resources/resources.js
- adding missed file from restws upgrade