Update main.js

Book fetch separated