Fix a bug causing TypeError when removing books in the middle

gh-6
Optimize jQuery selectors