Refactor with globals
Merge pull request #13 from NikZar/fix-object-interaction

Refactor with globals