Separated search

- No more combined searching
- Added REST functions in rest.js file
- More error logging