Fixed error in grid-snapping logic. Entities were being snapped to the grid after static collisions were processed but BEFORE dynamic collisions were resolved. This caused mis-snapping when an Entity with non-zero velocity collided with a fixed entity.
Lots of comments, as well as a general restructuring of the code to account for static AND dynamic collisions, rather than just static collisions.