Fixed soem of the typing to make it more generic.