game entities refactored to separate JS file