refactor into module - initial attempt
file rename
Refactored code to make it a library with functions, and a test script.