Refactored to use require.js.
Refactored so rectangle.js, general-utils.js and matrix-utils.js use AMD.