Finished the getKeys() method debugging. It now works properly. The only remaining thing is that the expected exponent length is still hardcoded.