Added a main and made it a proper python script