Cleaned up some code.  Now working on converting the coarse database to use binary I/O