fix module definitions and tests