Added compile script.
Added documentation for most of sys matrix building.