changed hash from md5 to sha1. Cleaned up db_tools