add in tests, allow package to be run as a bin file, update the code base