Update library.js

Fixed it so it select classes better.
Fixed the bug where it didn't select id's.
Overall selector fix.