Minor module refactoring for recent engine changes