Implements mif file generation