Refactored books controller

ok I wasn't really sure what should be under the API. Any json (html and data) that comes from the server? Or json data alone? I would agree with the second one.
I also don't like sending html in a json response, but as I said, that implementation detail will change, just not in this branch.