Changes type of Key's in structs and adds some more validations