Added build script.
Fixed an honest-to-god divide by zero error.
Added remaining comments.