Refactor ECDSA

Mostly fix warnings and hlint, but also some general cleanup.
Merge pull request #6 from singpolyma/refactor-ECDSA

Refactor ECDSA