Added types
Fixed load add
Various small fixes