Improved hash function
Added simplifier!