Cleanup

 - Moved some functions from Server to Util
 - cleaned similarTransactions code in Server