Added documentation and factored out rows/columns, see #182