Finalized version including some commenting and fixing of column names