changed spawnEntity, completed loadConfig

changed the spawnEntity to workaround the variable issue (still think
it's pass by value vs. pass by reference)