hash tests

• Added tests for hashes
• fixed related bugs
• removed debugging printout