Added more key types, added parameters and checks