Simplified key management, better repr. Fixed #12 and fixed #14.