Refactor some stuff, remove Keys management