Commit WIP. Key generation works nicely. Signing is fixed. Tests are OK for now...