More refactorings, finished most of the KeyList functions
More rewrites