Code tidy

- Re-factored the code to use a single factor initialization (as opposed to the two factor/proxy method that was there)

 - Removed the function that appended `new` (slightly more efficient to just add it when your setting the variable, as opposed to in the module)

 - Changed the switch case block to a object look-up table (http://jsperf.com/switch-vs-array)

 - Added a wee bit more documentation (mostly just jsdocs stuff)

 - Made barcode type changeable without having to re-declare a new variable

 - Removed unused path module declaration

Feel free to reject the pull if my stylistic changes are too radical