Added code to pass results to CIdb to store in the database. Cleaned up ...

...some old code.