Added tests and made all tests readable and executable
Changed math.c and gracelib.js to make math module compatible.