Working version, still needs to load where possible (perhaps through pickle)