Fixes global namespace leak

`event` and `marketplace` variables were leaked to global namespace