Add some generics, and make load methods consistent