modified massForce.m and created new file

Changes how spring force and gravitational force is calculated to reflect correct direction of forces. Added comments for clarity.