made most things local to reduce non native function calls and cpu
usage/fps drop