Split into a .py file we can import and a stand alone command option