Ported To Python 3, added CLI interface for easier access