More deduplication

1. Change getBarcode to use getBarcodeURL instead of duplicating code
2. Add some semicolons which didn't make their way into the last commit

I accidentally introduced some errors with semicolons in the last PR, sorry; this PR fixes them as well as deduplicating a little more. It still doesn't seem to fix the "open in new tab" functions, though. :(

I sincerely apologise for the mistake!