Implemented a proper Key system