refactored test loading and dependency management