added npmignore, a test, and refactored some variable initializations.