Fixed some of the typing to make it more generic.