moved key id generation responsibility to the backend, made autogenerated ids ints like they should be