POLY: readability
KEYGEN: improve error handling
ENC: rm redundant code