remove console.log wrapper, added global APP object & a bug fix