module handling refactoring
fixed client tests