first pass, still needs unit tests and deb support