(refactor) updated pub structs to modules, updated tests and methods