Make library more npm conform and minor updates
This includes the following:
- removal of dist folder as npm library file
- usage of package.json instead of .npmignore to define lib files
- addition of validating function for strings
- addition of unit tests