Changed KES views script so each line does not have to be run one at a time