Made ECDSA implementation better