removed legacy code from repo #2
changed responsibility of entity creation
successfully removed globals from code #5