cleaned up sql file, organized with pretty headings

Working on TRXLOG procedure next