Refactored test module