Added minimal file function, and corrected function statement result leak and multiple parameters parsing bug