added friction, added elasticity, and fixed the platform collision algorithm.