Code optimization: remove loop overhead.

The matrix population code was being run multiple times (depending on
the area of each element) but only one time is enough. Also, the first
space in each row of each element was being set twice.

The example codes are now pointing to the source mason.min.js instead of
pointing to its clone on js/ folder. This is safer because eliminates
the risk of forgeting to update the js/ folder on a commit.