Refactored min compile.