Script can now be imported as a module