global.js
    * replaced deprecated functions

Tidying