modified and organised python scripts [skip ci]