refactored collision detection to only copy entities once. Closes #21