Fix more logic in deploy script
More doploy.sh fixes and rename main file
Add Backward Compatibility