Cleanup Client.hs and fix reversed if statement