Fixed script and quantity string representations, only compile script when model is completely defined