Using subprocess.call and some other cleanup