modules refact finished, tests pass