Made changes to script-db to make sure starting fence was getting passed as value not reference and added more constants to script for easier modifications