Check for js code style
Update for jscs compliance
Add pdf file for testing
Generalize test context
Return false if early exit
Add additional automatic tests
Add PDF file test