removed non-amd function calls in viewer