Move module checks to main