Various loadpolicy script changes