made goals.html modal, refactored stats engine