Refactored code to be easy to include in new projects

Separated reusable barcode artifacts from example page artifacts.  Refactored most of the code to be simpler and to more clearly separate concerns.  Amazingly, it worked on the first try after making all these changes!
Reorganized project structure to put example artifacts into a new example dir
Added attribution to example and auto-focussed the input field
Add validation to get_check_digit() method and add comments to utility methods