when no schedule headcode set as empty string, other tidyups and optimisations