Various fixes for angular upgrade to angular 1.20, fixes for produciton upgrade.