Amazon - small cleanup, removed global vars/fn's